<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>abc</p>
    <script>
        // 1.document.write()
        document.write('<div>123</div>');
        // 2.innerHtml
        var p = document.getElementsByTagName('p');
        console.log(p[0]);
        p[0].innerHTML = '<a href="#">百度</a>';
        // 3.document.creatElement();
        document.createElement('p');
    </script>
</body>
</html>